import { request } from "@/utils/request";
import type { CommentData, PlayListCommentResult } from "@/types/comment";

// 新版评论接口
export const getPlayListCommentNew = (
  data: CommentData
): Promise<PlayListCommentResult> =>
  request({
    url: "/comment/new",
    method: "GET",
    data,
  });

// 楼层评论
export const getFloorComment = (
  data: CommentData
): Promise<PlayListCommentResult> =>
  request<PlayListCommentResult>({
    url: "/comment/floor",
    method: "GET",
    data,
  });

// 给评论点赞
export const likeComment = (data: {
  id: number;
  cid: number;
  t: 0 | 1;
  type: number;
}) => {
  return request({
    url: "/comment/like",
    method: "GET",
    data,
  });
};
